<html>
<head>

</head>
<body>

<div id="myDiv"><h2>通过 AJAX 改变文本</h2></div>
<button id="b01" type="button">改变内容</button>

</body>
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<!--<script type="text/javascript" src="/jquery/jquery.js"></script>-->
<script type="text/javascript">
    $(document).ready(function(){
        $("#b01").click(function(){
            $.ajax({
                type:"POST",
                url:"http://192.168.0.114:8000/api/SysInfo/UserLogin",
                dataType:"json",
                // data:{
                //     name:$("#staffName").val(),
                //     number:$("#staffNumber").val(),
                //     sex:$("#staffSex").val(),
                //     job:$("#staffJob").val()
                // },
                success:function(data){
                    console.log('获取到的数据');
                    console.log(data);
                    // if(data.success){
                    //     $("#createResult").html(data.msg);
                    // }else{
                    //     $("#createResult").html("出现错误："+data.msg);
                    // }
                },
                error: function(jqXHR){
                    alert("发生错误："+jqXHR.status);
                }
            });
        });
    });
</script>
</html>
